import 'package:flutter/material.dart';
import 'package:sonora/constants.dart';

class PrivacyDialog extends StatelessWidget{
  const PrivacyDialog({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
        height: 360,
        padding: EdgeInsets.only(top: 20),
        decoration: BoxDecoration(
            border: Border(
              left: BorderSide(
                width: 2,//宽度
                color: Colors.black, //边框颜色
              ),
              top: BorderSide(
                width: 2,//宽度
                color: Colors.black, //边框颜色
              ),
              right: BorderSide(
                width: 2,//宽度
                color: kPrimaryColor, //边框颜色
              ),
              bottom: BorderSide(
                width: 2,//宽度
                color: kPrimaryColor, //边框颜色
              ),
            )
        ),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Image(
              width: 60,
              height: 60,
              image: AssetImage('assets/images/logo.png'),
            ),
            SizedBox(
              height: 10,
            ),
            Text('Sonora',
                style: TextStyle(color: kSecondaryColor,fontSize: 24,decoration: TextDecoration.none,fontFamily: 'Galada',)),
            SizedBox(
              height: 20,
            ),
            Text('By using our App you agree with our Term of \n Use and Privacy Policy.',
                textAlign: TextAlign.center,
                style: TextStyle(color: kSecondaryColor,fontSize: 14,
                    decoration: TextDecoration.none,fontFamily: 'Galada')),
            SizedBox(
              height: 20,
            ),
            Padding(
              padding: EdgeInsets.only(left: 52,right: 52),
              child: SizedBox(
                height: 40,
                child: ElevatedButton(
                  onPressed: () {
                    Navigator.of(context).pop(true);
                  },
                  style: ElevatedButton.styleFrom(
                    backgroundColor: kSecondaryColor,
                    elevation: 0,

                  ),
                  child: Text(
                    "Agree and Continue",
                    style: const TextStyle(color: kPrimaryColor,fontSize: 16,decoration: TextDecoration.none,fontFamily: 'Galada',),
                  ),
                ),
              ),

            ),
            SizedBox(
              height: 10,
            ),
            Padding(
              padding: EdgeInsets.only(left: 52,right: 52),
              child: SizedBox(
                height: 40,
                child: ElevatedButton(
                  onPressed: () {
                    Navigator.of(context).pop(false);
                  },
                  style: ElevatedButton.styleFrom(
                    backgroundColor:Color.fromRGBO(249, 93, 167, 0.15),
                    elevation: 0,

                  ),
                  child: Text(
                    "Cancel",
                    style: const TextStyle(color: kPrimaryColor,fontSize: 16,decoration: TextDecoration.none,fontFamily: 'Galada',),
                  ),
                ),
              ),

            ),
          ],
        )
    );
  }

}